package com.healthcloud.service;

import java.util.ArrayList;
import java.util.HashMap;

import com.healthcloud.entity.AllergicHistory;
import com.healthcloud.utils.Pagine;

/**
 * Created by XYC on 2015/7/15.
 */
public interface AllergicHistoryService {
    /**
     * @param allergicHistory
     * @param operate  true 为只存，false保存、修改
     * @return
     */
    AllergicHistory saveOrUpdata(AllergicHistory allergicHistory,Boolean operate);

    /**
     * 保存遗传史的list相关内容
     * @param allergicHistories
     * @return
     */
    Boolean saveEntityList(ArrayList<AllergicHistory> allergicHistories);

    /**
     * 根据实体查找相关信息
     * @param allergicHistory
     * @return
     */
    ArrayList<AllergicHistory> findByEntity(AllergicHistory allergicHistory);

    ArrayList<AllergicHistory> findByEntity(AllergicHistory allergicHistory,Pagine<AllergicHistory> pagine);

    /**
     * 根据IdCard查找相关信息
     * @param allergicHistory
     * @return
     */
    ArrayList<AllergicHistory> findByIdCard(AllergicHistory allergicHistory);

    /**
     *
     * @param allergicHistory
     * @param pagine
     * @return
     */
    ArrayList<AllergicHistory> findByIdCard(AllergicHistory allergicHistory,Pagine<AllergicHistory> pagine);

    /**
     * 根据idCard删除数据库相关内容
     * @param allergicHistory
     * @return
     */
    Boolean deletByIdCard(AllergicHistory allergicHistory);

    /**
     * 根据实例删除相关内容
     * @param allergicHistory
     * @return
     */
    Boolean deletByEntity(AllergicHistory allergicHistory);

    /**
     * 根据过敏史表中ID字段进行数据删除
     * @param idData
     * @return
     */
    Boolean deleByIDs(String idData);

    /**
     * 对list数组进行统处理
     * @param allergicHistories
     */
    void listAddDate(ArrayList<AllergicHistory> allergicHistories);

    /**
     * 将部分属性值为Id的转化为相应现实内容进行现实
     * @param dictHashMap
     * @param allergicHistories
     */
    void fillInAttribute(HashMap<String,HashMap> dictHashMap , ArrayList<AllergicHistory> allergicHistories);

    /**
     * 改变现实时间
     * @param allergicHistories
     */
    void changeShowTime(ArrayList<AllergicHistory> allergicHistories);
}
